﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MishraReader.Entities;
using MishraReader.Entities.ShareServices;
using MishraReader.Services;
using MishraReader.ViewModels.Settings.Options;
using Ninject;
using Ninject.Modules;

namespace MishraReader
{
    public class TwitterModule : NinjectModule
    {
        public override void Load()
        {
            Bind<ITwitterApi>().To<TwitterApi>();

            Bind<Func<IShareServiceConfigurationViewModel>>().ToMethod(
                ctx =>
                () => ctx.Kernel.Get<TwitterConfigurationViewModel>()).WhenInjectedInto<TwitterShareServicePackage>();

            Bind<IShareService>().To<TwitterShareService>().WhenInjectedInto<TwitterShareServicePackage>();

            Bind<IShareServicePackage>().To<TwitterShareServicePackage>();
        }
    }
}
